<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box {
            width: 1440px;
            height: 500px;
            margin: auto;
            overflow: hidden;
        }
        
        #box ul {
            list-style: none;
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
            position: relative;
        }
        
        #box ul li {
            position: absolute;
            height: 100%;
            width: 1440px;
        }
    </style>
    <script src="js/jquery-3.5.1.min.js"></script>
</head>

<body>
    <div id="box">
        <ul>
            <li><img src="images/wallhaven-k7d5l6.png" alt=""></li>
            <li><img src="images/wallhaven-72rxqo.jpg" alt=""></li>
            <li><img src="images/wallhaven-j5ejwp.jpg" alt=""></li>
        </ul>
    </div>
    <script>
        // $('ul li').eq(2).fadeOut(4000, function() {
        //     $('ul li').eq(1).fadeOut(4000, function() {
        //         $('ul li').eq(0).fadeOut(4000)
        //     });
        // });
        setInterval(function() {
            var $last = $('ul li').last();
            $last.fadeOut(1000, function() {
                var $first = $('ul li').first();
                $first.before($last);
                $last.css('display', 'block');
            });
        }, 3000)
    </script>
</body>

</html>